<div id="content" class="span10">

   <div>
    <ul class="breadcrumb">
      <li>
        <a href="<?php echo base_url('panel'); ?>">Inicio</a> <span class="divider">/</span>
      </li>
      <li>
        <a href="<?php echo base_url('panel/usuarios'); ?>">Usuarios</a> <span class="divider">/</span>
      </li>
      <li>Agregar Paquete</li>
    </ul>
  </div>

  <div class="row-fluid">
    <div class="box span12">

      <div class="box-header well" data-original-title> <!-- START BOX-HEADER -->
        <h2><i class="icon-edit"></i> Agregar Paquete</h2>
        <div class="box-icon">
          <a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
          <a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
        </div>
      </div>  <!-- END BOX-HEADER -->

      <div class="box-content"> <!-- START BOX-CONTENT -->

        <form class="form-horizontal" action="<?php echo base_url('panel/paquetes/agregar/?id='.$_GET['id']); ?>" method="POST">  <!-- START FORM -->

            <div class="control-group">
              <label class="control-label" for="ftipo">Tipo</label>
              <div class="controls">
                 <select name="ftipo" id="ftipo">
                  <option value="segmento" <?php echo set_select('ftipo', 'segmento', false, $this->input->post('ftipo')); ?>>INDIVIDUAL</option>
                  <option value="todo" <?php echo set_select('ftipo', 'todo', false, $this->input->post('ftipo')); ?>>ILIMITADO</option>
                </select>
              </div>
            </div>

            <div class="control-group">
              <label class="control-label" for="fusuarios_permitidos">Usuarios permitidos</label>
              <div class="controls">
                <input type="number" name="fusuarios_permitidos" id="fusuarios_permitidos" value="<?php echo set_value('fusuarios_permitidos'); ?>" size="30" min="1">
                <span class="help-block">Maximo de usuario permitidos Ej: 50</span>
              </div>
            </div>

            <div class="control-group">
              <label class="control-label" for="ffecha_vencimiento">Fecha de vencimiento</label>
              <div class="controls">
                <input type="text" name="ffecha_vencimiento" id="ffecha_vencimiento" value="<?php echo set_value('ffecha_vencimiento'); ?>" size="30" min="1">
              </div>
            </div>

            <div class="control-group">
              <label class="control-label" for="fcosto">Costo</label>
              <div class="controls">
                  <input type="text" name="fcosto" id="fcosto" value="<?php echo set_value('fcosto'); ?>" class="vnumeric" size="5">
              </div>
            </div>

            <div class="control-group" id="list-articulos"> <!-- START listado articulos -->
              <label class="control-label" for="">Publicaciones</label>
              <div class="controls controls-row">
                <?php foreach ($articulos as $key => $tipo){ ?>
                  <table class="table table-striped table-bordered table-hover table-condensed span4">

                    <thead style="display: block;">
                      <tr style="display: block; background-color: #ddd;">
                        <th style="display: block; text-align: center;"><?php echo $tipo['tipo']; ?></th>
                      </tr>
                    </thead>
                    <tbody style="display: block; overflow-y: auto; max-height:324px;">
                       <?php foreach ($tipo['articulos'] as $key => $articulo){ ?>
                        <tr style="display: block;">
                          <td style="display: block;"><label><input type="checkbox" name="articulos[]" value="<?php echo $articulo->id_articulo; ?>" <?php echo set_checkbox('articulos[]', $articulo->id_articulo) ?> ><?php echo $articulo->titulo; ?></label></td>
                        </tr>
                      <?php } ?>
                    </tbody>
                  </table>
                <?php } ?>
              </div>
            </div> <!-- END listado articulos -->

            <div class="control-group">
              <label class="control-label" for="fip1">Información Ip's</label>
              <div class="controls">

                <div class="input-append">
                    <input type="text" name="fip1" id="fip1" value="<?php echo set_value('fip1'); ?>" size="30"><span class="add-on"><i class="icon-globe"></i> IP 1</span>
                </div>
                <span class="help-block"></span>
                <div class="input-append">
                    <input type="text" name="fip2" id="fip2" value="<?php echo set_value('fip2'); ?>" size="30"><span class="add-on"><i class="icon-globe"></i> IP 2</span>
                </div>
                <span class="help-block"></span>
                <div class="input-append">
                    <input type="text" name="fip3" id="fip3" value="<?php echo set_value('fip3'); ?>" size="30"><span class="add-on"><i class="icon-globe"></i> IP 3</span>
                </div>
                <span class="help-block"></span>
                <div class="input-append">
                    <input type="text" name="fip4" id="fip4" value="<?php echo set_value('fip4'); ?>" size="30"><span class="add-on"><i class="icon-globe"></i> IP 4</span>
                </div>
                <span class="help-block"></span>
                <div class="input-append">
                    <input type="text" name="fip5" id="fip5" value="<?php echo set_value('fip5'); ?>" size="30"><span class="add-on"><i class="icon-globe"></i> IP 5</span>
                </div>
              </div>
            </div>

            <div class="form-actions">
              <button type="submit" class="btn btn-primary">Guardar</button>
              <a href="<?php echo base_url('panel/usuarios'); ?>" type="button" class="btn">Cancelar</a>
            </div>

        </form> <!-- END FORM -->
      </div> <!-- END BOX-CONTENT -->
    </div>
  </div>

</div>




<!-- Bloque de alertas -->
<?php if(isset($frm_errors)){
  if($frm_errors['msg'] != ''){
?>
<script type="text/javascript" charset="UTF-8">
  $(document).ready(function(){
    noty({"text":"<?php echo $frm_errors['msg']; ?>", "layout":"topRight", "type":"<?php echo $frm_errors['ico']; ?>"});
  });
</script>
<?php }
}?>
<!-- Bloque de alertas -->